package org.example.util;

import java.time.LocalDateTime;
import java.util.Random;

public class WackyUsernameGenerator {

    private static final String[] TITLES = {
            "宇宙级", "量子态", "高维度", "裂开型", "赛博朋克", "究极进化", "离谱无边", "天降", "元气满满", "超限乱斗", "神级", "社死级", "裂开版", "AI觉醒", "反人类级"
    };

    private static final String[] NOUNS = {
            "社恐勇者", "嘴强王者", "咸鱼战神", "卷王之王", "摆烂仙尊", "摸鱼圣手", "内耗大师", "精神小伙", "反内卷斗士", "逻辑鬼才", "朋克奶茶", "人形bug", "报表修仙人", "周会噩梦", "键盘猛男"
    };

    private static final String[] ACTIONS = {
            "在会议室打盹", "边提需求边删代码", "通宵debug还被骂", "在群里社死", "PPT还没写完", "和bug共舞", "跟老板battle", "在心里裸辞", "靠咖啡续命", "在五环外漂泊", "被需求追着跑", "一边崩溃一边上线", "和KPI谈恋爱"
    };

    private static final String[] ANIMALS = {
            "战斗柴犬", "背锅鹅", "加班猴", "摸鱼鲲", "野生打工人", "尾款豚鼠", "羊毛刺猬", "加班兔", "绝望蟑螂", "敲代码鸽", "精神仓鼠", "社交恐龙", "螺旋上升乌龟", "随机闪现熊猫", "发疯鹦鹉"
    };

    private static final String[] MODIFIERS = {
            "の", "™", "MAX", "-X", "Pro Max", "∞", "✖", "之魂", "Plus Ultra", "限定版"
    };

    private static final Random random = new Random();

    public static String generate() {
        String title = TITLES[random.nextInt(TITLES.length)];
        String noun = NOUNS[random.nextInt(NOUNS.length)];
        String animal = ANIMALS[random.nextInt(ANIMALS.length)];
        String action = ACTIONS[random.nextInt(ACTIONS.length)];
        String modifier = MODIFIERS[random.nextInt(MODIFIERS.length)];

        int pattern = random.nextInt(6);

        return switch (pattern) {
            case 0 -> title + noun + modifier + animal;
            case 1 -> "我是" + noun + "但我在" + action;
            case 2 -> noun + modifier + "的" + animal;
            case 3 -> "别卷了" + noun + "去" + action;
            case 4 -> "震惊！" + title + animal + "竟然" + action;
            case 5 -> "谁在" + action + "？原来是" + noun + "！";
            default -> noun + "永不加班";
        };
    }

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            System.out.println(WackyUsernameGenerator.generate());
        }
        System.out.println(LocalDateTime.now());
    }
}
